using UniversalAdminSystem.Domian.Core.Interfaces;
using UniversalAdminSystem.Domian.UserManagement.Aggregates;
using UniversalAdminSystem.Domian.UserManagement.Entities;

namespace UniversalAdminSystem.Domian.UserManagement.IRepository;

/// <summary>
/// 用户仓储接口，提供特定于User的额外方法
/// </summary>
public interface IUserRepository : IRepository<User>
{
    /// <summary>
    /// 用户软删除
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task DeleteUserSoftAsync(Guid id);

    /// <summary>
    /// 通过账号查询用户
    /// </summary>
    /// <param name="account"></param>
    /// <returns></returns>
    Task<User?> GetUserByAccountAsync(string account);

    /// <summary>
    /// 通过邮箱查询用户
    /// </summary>
    /// <param name="email"></param>
    /// <returns></returns>
    Task<User?> GetUserByEmailAsync(string email);

    /// <summary>
    /// 添加用户信息
    /// </summary>
    /// <param name="userInfo"></param>
    /// <returns></returns>
    Task AddUserInfoAsync(UserInfo userInfo);
}